"use strict";

module.exports = app => {
  const { INTEGER, STRING } = app.Sequelize;

  const Model = app.model.define(
    "User",
    {
      userId: {
        type: INTEGER,
        primaryKey: true,
        autoIncrement: true,
      },
      username: STRING,
      password: STRING,
      isAdmin: INTEGER,
    },
    {
      tableName: "user",
      timestamps: false, // 关闭 创建和更新时间设置
    }
  );

  return Model;
};
